<!--  -->
<template>
<div class='standBookList'>
    <h2 class="standBookList_title">台账设置</h2>
    <Tabs type="card" :animated="false" @on-click='tabClick' :value="tabVal">
        <Tab-pane v-if="ifFieldList" label="台账字段库" name="tab1"><field-list/></Tab-pane>
        <Tab-pane v-if="ifBuildingField" label="本案台账" name="tab2"><building-fileld/></Tab-pane>
        <!-- <Tab-pane label="历史字段变更"><date-change/></Tab-pane> -->
    </Tabs>
</div>
</template>

<script>
import fieldList from "./fieldList.vue"
import buildingFileld from "./buildingField.vue"
import dateChange from "./dateChange.vue"
export default {
components: {fieldList, buildingFileld, dateChange},
data() {
return {
  ifFieldList:false,
  ifBuildingField:false,
  tabVal:this.$route.query.fromCustomer?"tab2":"tab1"

};
},
computed: {},
watch: {},
methods: {
  tabClick(val){
    console.log(val,'tab');
  }
},
beforeCreate(){
  
},
created() {
  let buttonControl = this.$tool.getStorage("buttonControl");
  buttonControl = buttonControl?JSON.parse(buttonControl):{};
  let buttonsC = buttonControl?buttonControl['配置管理']:[];
  this.ifFieldList = buttonsC.findIndex(item=>item == "1000104")>-1;
  this.ifBuildingField = buttonsC.findIndex(item=>item == "1000105")>-1;
  
},
mounted() {

},
}
</script>
<style lang='scss' scoped>
.standBookList{
 padding-left: 14px;
 overflow: hidden;
 height: 100%;
 &_title{
   padding: 8px 14px 8px 0;  
 } 
}
</style>